package com.ruoyi.enterprise.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.enterprise.mapper.ComHolderCountMapper;
import com.ruoyi.enterprise.domain.ComHolderCount;
import com.ruoyi.enterprise.service.IComHolderCountService;

/**
 * 十大股东Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-05
 */
@Service
public class ComHolderCountServiceImpl implements IComHolderCountService
{
    @Autowired
    private ComHolderCountMapper comHolderCountMapper;

    /**
     * 查询十大股东
     * 
     * @param id 十大股东主键
     * @return 十大股东
     */
    @Override
    public ComHolderCount selectComHolderInfoById(Long id)
    {
        return comHolderCountMapper.selectComHolderInfoById(id);
    }

    /**
     * 查询十大股东列表
     * 
     * @param comHolderCount 十大股东
     * @return 十大股东
     */
    @Override
    public List<ComHolderCount> selectComHolderInfoList(ComHolderCount comHolderCount)
    {
        return comHolderCountMapper.selectComHolderInfoList(comHolderCount);
    }

    /**
     * 新增十大股东
     * 
     * @param comHolderCount 十大股东
     * @return 结果
     */
    @Override
    public int insertComHolderInfo(ComHolderCount comHolderCount)
    {
        comHolderCount.setCreateTime(DateUtils.getNowDate());
        return comHolderCountMapper.insertComHolderInfo(comHolderCount);
    }

    /**
     * 修改十大股东
     * 
     * @param comHolderCount 十大股东
     * @return 结果
     */
    @Override
    public int updateComHolderInfo(ComHolderCount comHolderCount)
    {
        comHolderCount.setUpdateTime(DateUtils.getNowDate());
        return comHolderCountMapper.updateComHolderInfo(comHolderCount);
    }

    /**
     * 批量删除十大股东
     * 
     * @param ids 需要删除的十大股东主键
     * @return 结果
     */
    @Override
    public int deleteComHolderInfoByIds(Long[] ids)
    {
        return comHolderCountMapper.deleteComHolderInfoByIds(ids);
    }

    /**
     * 删除十大股东信息
     * 
     * @param id 十大股东主键
     * @return 结果
     */
    @Override
    public int deleteComHolderInfoById(Long id)
    {
        return comHolderCountMapper.deleteComHolderInfoById(id);
    }
}
